home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / Bonus / VCLZip / kp222_b5.exe / kpMatch.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-07-23  |  2.2 KB  |  59 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1999 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'kpMatch.pas' rev: 5.00
  6.  
  7. #ifndef kpMatchHPP
  8. #define kpMatchHPP
  9.  
  10. #pragma delphiheader begin
  11. #pragma option push -w-
  12. #pragma option push -Vx
  13. #include <SysUtils.hpp>    // Pascal unit
  14. #include <SysInit.hpp>    // Pascal unit
  15. #include <System.hpp>    // Pascal unit
  16.  
  17. //-- user supplied -----------------------------------------------------------
  18.  
  19. namespace Kpmatch
  20. {
  21. //-- type declarations -------------------------------------------------------
  22. typedef Set<char, 0, 255>  TCharSet;
  23.  
  24. //-- var, const, procedure ---------------------------------------------------
  25. static const Shortint MATCH_PATTERN = 0x6;
  26. static const Shortint MATCH_LITERAL = 0x5;
  27. static const Shortint MATCH_RANGE = 0x4;
  28. static const Shortint MATCH_ABORT = 0x3;
  29. static const Shortint MATCH_END = 0x2;
  30. static const Shortint MATCH_VALID = 0x1;
  31. static const Shortint PATTERN_VALID = 0x0;
  32. static const Shortint PATTERN_ESC = 0xffffffff;
  33. static const Shortint PATTERN_RANGE = 0xfffffffe;
  34. static const Shortint PATTERN_CLOSE = 0xfffffffd;
  35. static const Shortint PATTERN_EMPTY = 0xfffffffc;
  36. static const char MATCH_CHAR_SINGLE = '\x3f';
  37. static const char MATCH_CHAR_KLEENE_CLOSURE = '\x2a';
  38. static const char MATCH_CHAR_RANGE_OPEN = '\x3c';
  39. static const char MATCH_CHAR_RANGE = '\x2d';
  40. static const char MATCH_CHAR_RANGE_CLOSE = '\x3e';
  41. static const char MATCH_CHAR_CARAT_NEGATE = '\x5e';
  42. static const char MATCH_CHAR_EXCLAMATION_NEGATE = '\x21';
  43. extern PACKAGE bool __fastcall IsMatch(AnsiString pattern, AnsiString text);
  44. extern PACKAGE int __fastcall matche(AnsiString pattern, AnsiString text);
  45. extern PACKAGE int __fastcall match_after_star(AnsiString pattern, AnsiString text);
  46. extern PACKAGE bool __fastcall is_pattern(AnsiString pattern);
  47. extern PACKAGE bool __fastcall is_valid_pattern(AnsiString pattern, int &error_type);
  48.  
  49. }    /* namespace Kpmatch */
  50. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  51. using namespace Kpmatch;
  52. #endif
  53. #pragma option pop    // -w-
  54. #pragma option pop    // -Vx
  55.  
  56. #pragma delphiheader end.
  57. //-- end unit ----------------------------------------------------------------
  58. #endif    // kpMatch
  59.